/** 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package it.free.i;

import it.free.i.virtual.machine.tools.ObjectIniector;

/** 
 * Factory of factories
 * @author stefano
 */
public class AbstractFactory { 

	public AbstractFactory() {
	}

	public String buildLookupName(String lookupName) {
		return null;
	}

	/**
	 * Create an object factory from a factory class object giving back a factory instance 
	 * @param clazz is the class implementig a factory whose instance needs to be created 
	 * @return an PositioningSystemDomainObjectFactory instance
	 * @throws Exception 
	 */
	@SuppressWarnings("unchecked")
	public static final Factory createFactory(Class clazz) throws Exception{
		return (Factory) ObjectIniector.classForName(clazz.getName());
	}

}
